import { Map } from 'immutable'

const reducer = (state, payload) => {
    if (!state) {
        state = Map({
            show: true
        })
    }
    switch (payload.type) {
        case 'auto':
            return state.set('show', window.location.hash.includes(payload.value))
        default:
            return state
    }
}

export default reducer
